<% terminal_info = @terminal.terminal_info %>
<% if terminal_info.blank? %>
  请完善相关信息！
<% else %>
  <dl class="dl-horizontal">
    <dt>版本信息</dt>
    <dd>
      <%= @terminal.terminal_version.try(:name) + ' - ' + @terminal.terminal_version.try(:version) %>
    </dd>
    <dt>运行时间</dt>
    <dd>
      <% hours = terminal_info.duration.blank? ? 0 : terminal_info.duration / 3600 %>
      <% minutes = terminal_info.duration.blank? ? 0 : ((terminal_info.duration - 3600 * hours) / 60) %>
      <% seconds =  terminal_info.duration.blank? ? 0 : (terminal_info.duration - 3600 * (hours || 0 )- 60 * (minutes || 0)) %>
      <%= hours %>时<%= minutes %>分<%= seconds %>秒
    </dd>
    <dt>WAN/3G</dt>
    <dd>
      <%= terminal_info.wan_3g || 'NULL' %>
    </dd>
    <dt>SSID</dt>
    <dd>
      <%= terminal_info.ssid || 'NULL' %>
    </dd>
    <dt>信道</dt>
    <dd>
      <%= terminal_info.xindao || 'NULL' %>
    </dd>
    <dt>无线模式</dt>
    <dd>
      <%= terminal_info.wifi_model || 'NULL' %>
    </dd>
    <dt>加密方式</dt>
    <dd>
      <%= terminal_info.encrypt || 'NULL' %>
    </dd>
    <dt>在线人数</dt>
    <dd>
      <%= terminal_info.online_users || 0 %>
    </dd>
    <dt>签到人数</dt>
    <dd>
      <%= terminal_info.sign_users || 0 %>
    </dd>
    <dt>YmTV观看人数</dt>
    <dd>
      <%= terminal_info.watching_users || 0 %>
    </dd>
    <dt>IP限速(Mbps)</dt>
    <dd>
      <%= terminal_info.limited_bandwidth || 0 %>
    </dd>
    <dt>流量阀值(M)</dt>
    <dd>
      <%= terminal_info.max_bandwidth || 0 %>
    </dd>
    <dt>3G空闲时间</dt>
    <dd>
      <%= terminal_info.ft3g_start.stamp("2013-03-12 22:01:22") %> ~ <%= terminal_info.ft3g_end.stamp("2013-03-12 22:01:22") %>
    </dd>
  </dl>
<% end %>